< previous page page_183 next page >

Page 183
From what you've seen, designing the application form is more than just throwing controls on the form and some buttons for navigation. You want to take everything you have learned and combine it into your application. Whatever style application interface you eventually decide to use, they all have certain elements included on them.
One of the features of Visual Basic is the capability to prototype your application. This means to create an application structure with all of the forms and navigation in it, but none of the unique application code included. You can start this application and navigate from form to form, testing each of the command buttons or menu options without spending time on the detailed code until you are satisfied with the form's design. If you decide to use the Visual Basic Application Wizard, you can create the basic application model quickly; however, you do not really learn the different components that are used.
During this first week you have seen how to create each of the different building blocks available for your application. Now it's time to put them together and learn what happens when you do that. When you are working with only one feature during the learning process, no user issues might appear. However, when your application is finished and the user is in the middle of entering new information, for example, what happens if the user clicks the Add Entry button again? This sounds simple, but think about it. Your application is in the middle of a database add function when the user requests another add function. You have the following choices as to what the application could do:
Cancel the previous Add, losing any data entered.
Prompt the user to save the previous entry and then continue.
Prevent the second add request while the entry form is in use.
Each of these choices carries with it its own set of program design issues. To see how everything comes together, you are going to build the prototype application defined in Figure 7.12. Start a new project and name it ADDRBOOK. Then add a new MDI form to the project, naming it mdiMainForm and removing the original form. Add two more forms to the project, one for the data-entry function and one for the search function. Change their properties so that they are child forms and name them frmEntry and frmSrch, respectively. The only controls that you will add to these forms will be a command-button control. Add one command button to each form that will unload that form when clicked. Don't worry about the other forms shown in the diagram, you will add them later.
Menus
You are going to add a menu to this main form, but first, you must decide which options you want to provide on the menu. An address book application usually needs the following options:

 
< previous page page_183 next page >

If you like this book, buy it!